
public class Test {
    /*class Solution {
        public ListNode mergeTwoLists(ListNode headA, ListNode headB) {
            ListNode newhead = new ListNode(10);
            ListNode tmp = newhead;
            while(headA != null && headB != null){
                if(headA.val < headB.val){
                    tmp.next = headA;
                    headA = headA.next;
                    tmp = tmp.next;
                }else{
                    tmp.next = headB;
                    headB = headB.next;
                    tmp = tmp.next;
                }
            }
            if(headA != null){
                tmp.next = headA;
            }
            if(headB != null){
                tmp.next = headB;
            }

            return newhead.next;
        }
    }*/


   /* public class Partition {
        public ListNode partition(ListNode head, int x) {
            // write code here
            ListNode bs = null;
            ListNode be = null;
            ListNode as = null;
            ListNode ae = null;
            ListNode cur = head;
            while(cur != null){
                if(cur.val < x){
                    if(bs == null){
                        bs = be = cur;
                    }else{
                        be.next = cur;
                        be = be.next;
                    }
                }else{
                    if(as == null){
                        as = ae = cur;
                    }else{
                        ae.next = cur;
                        ae = ae.next;
                    }
                }
                cur = cur.next;
            }
            if(bs == null){
                return as;
            }
            be.next = as;
            if(as != null){
                ae.next = null;
            }
            return bs;
        }
    }*/



   /* public class PalindromeList {
        public boolean chkPalindrome(ListNode head) {
            // write code here
            if(head == null){
                return true;
            }
            ListNode fast = head;
            ListNode slow = head;
            while(fast != null && fast.next != null){
                fast = fast.next.next;
                slow = slow.next;
            }
            ListNode cur = slow.next;
            while(cur != null){
                ListNode curN = cur.next;
                cur.next = slow;
                slow = cur;
                cur = curN;
            }
            while(head != slow){
                if(head.val != slow.val){
                    return false;
                }
                if(head.next == slow){
                    return true;
                }
                head = head.next;
                slow = slow.next;
            }
            return true;
        }
    }*/
}


